package al.ui;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import javax.swing.BoxLayout;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.SwingConstants;

//http://prevert.upmf-grenoble.fr/Prog/Java/swing/JTabbedPane.html
//http://jmdoudoux.developpez.com/cours/developpons/java/chap-swing.php#swing-7
//http://tango.freedesktop.org/Tango_Icon_Library

public class TabbedPane extends JPanel {
	JPanel content;

		
	public TabbedPane(JPanel onglet[],String nom[]){
		this.setLayout(new FlowLayout(FlowLayout.CENTER));
		this.setBackground(Color.WHITE);
		content = new JPanel();
		content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));
		content.setBackground(Color.WHITE);
		
		JTabbedPane onglets = new JTabbedPane(SwingConstants.TOP);
			
		for (int i=0;i<onglet.length;i++){
			onglet[i].setPreferredSize(new Dimension(1000, 500));
		    onglets.addTab(nom[i], onglet[i]);
			
		}
	    
	    /*
		Famille onglet2 = new Famille();
	    onglet2.setPreferredSize(new Dimension(540, 420));
	    onglets.addTab("Famille", onglet2);
	    
		Forme onglet3 = new Forme();
	    onglet3.setPreferredSize(new Dimension(540, 420));
	    onglets.addTab("Forme", onglet3);*/
	    		
		//onglets.setOpaque(true);
		content.add(onglets);
												
		this.add(content);
		
	}
}
